package com.example.framework509.common.exceptions.base;

public class BaseCustomException extends RuntimeException{

    private Integer code;

    private String message;

    public BaseCustomException(Integer code,String message){
        super(message);
        this.code = code;
        this.message = message;
    }

    public BaseCustomException(String message){
        super(message);
        this.code = 1001;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "BaseCustomException{" + "code=" + code + ", message='" + message + '\'' + '}';
    }
}
